<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="送货明细一览表" />
<c:if test="${currentUser.user.userType==1 || fn:indexOf(currentUser.privs,';NO_BUSI_COST;')==-1}">
	<c:set var="showCost" value="1" />
</c:if>
<%@ include file="../inc/Title.jsp"%>
<head>
<link href="/css/Query.css" rel="stylesheet" type="text/css">
<link href="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="/css/BillList.css" />
<script src="/js/QueryList.js"></script>
<script src="/js/popup_ext.js"></script>
<script src="/calendar/dhtmlgoodies_calendar/dhtmlgoodies_calendar.js"></script>
<script language="javascript">
	function checkDateStr(){
		var startDate=document.getElementById("start_date").value;
		if(startDate==null || startDate==''){
			ShowAlert('提示框','请选择送货开始日期',200,100);
			return false;
		}else{
			var arr=startDate.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','送货开始日期格式不正确',200,100);
				return false;
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','送货开始日期格式不正确',200,100);
				return false;
			}
		}
		var endDate=document.getElementById("end_date").value;
		if(endDate==null || endDate==''){
			ShowAlert('提示框','请选择送货结束日期',200,100);
			return false;
		}else{
			var arr=endDate.split("-");
			if(arr.length==null || arr.length!=3){
				ShowAlert('提示框','送货结束日期格式不正确',200,100);
				return false;
			}else if(isNaN(arr[0]) || isNaN(arr[1]) || isNaN(arr[2])){
				ShowAlert('提示框','送货结束日期格式不正确',200,100);
				return false;
			}
		}
		return true;
	}
	
	function createPageParaStr(){
		var str="start_date="+encodeURIComponent(document.getElementById("start_date").value);
		str=str+"&end_date="+encodeURIComponent(document.getElementById("end_date").value);
		
		var exam="A";
		if(document.getElementById("examine1").checked){
			exam="Y";
		}else if(document.getElementById("examine2").checked){
			exam="N";
		}
		str=str+"&exam="+exam;
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("bill_code").value);
		str=str+"&mt_id="+document.getElementById("mt_id").value;
		str=str+"&bb_code="+encodeURIComponent(document.getElementById("bb_code").value);
		str=str+"&cont="+encodeURIComponent(document.getElementById("cont").value);
		str=str+"&fc="+encodeURIComponent(document.getElementById("fc").value);
		str=str+"&prod="+encodeURIComponent(document.getElementById("prod").value);
		str=str+"&est_name="+encodeURIComponent(document.getElementById("est_name").value);
		str=str+"&pm_id="+document.getElementById("pm_id").value;
		str=str+"&ts_id="+document.getElementById("ts_id").value;
		str=str+"&order_by="+document.getElementById("order_by").value;
		str=str+"&order_sc="+document.getElementById("order_sc").value;
		return str;
	}
	
	function createProgramParaStr(){
		var str="start_date="+encodeURIComponent(document.getElementById("hid_start_date").value);
		str=str+"&end_date="+encodeURIComponent(document.getElementById("hid_end_date").value);
		str=str+"&exam=${exam}";
		str=str+"&bill_code="+encodeURIComponent(document.getElementById("hid_bill_code").value);
		str=str+"&mt_id=${mtId}";
		str=str+"&bb_code="+encodeURIComponent(document.getElementById("hid_bb_code").value);
		str=str+"&cont="+encodeURIComponent(document.getElementById("hid_cont").value);
		str=str+"&fc="+encodeURIComponent(document.getElementById("hid_fc").value);
		str=str+"&prod="+encodeURIComponent(document.getElementById("hid_prod").value);
		str=str+"&est_name="+encodeURIComponent(document.getElementById("hid_est_name").value);
		str=str+"&pm_id=${pmId}";
		str=str+"&ts_id=${tsId}";
		str=str+"&order_by=${orderBy}";
		str=str+"&order_sc=${orderSc}";
		return str;
	}

	function doSearch(){
		var str;
		if(IsAdvSearch){//高级
			str="search_type=1";
			if(document.getElementById("cb_deli_date").checked){
				if(checkDateStr()){
					str=str+"&cb_deli_date=1";
				}else{
					return;
				}
			}
			if(document.getElementById("cb_exam").checked){
				str=str+"&cb_exam=1";
			}
			if(document.getElementById("cb_bill_code").checked){
				var billCode=document.getElementById("bill_code").value.trim();
				if(billCode==null || billCode==""){
					ShowAlert('提示框','请输入送货单号',200,100);
					return;
				}
				str=str+"&cb_bill_code=1";
			}
			if(document.getElementById("cb_mt").checked){
				var mtId=document.getElementById("mt_id").value;
				if(mtId==null || mtId=="" || mtId=="0"){
					ShowAlert('提示框','请选择项目类型',200,100);
					return;
				}
				str=str+"&cb_mt=1";
			}
			if(document.getElementById("cb_bb_code").checked){
				var bbCode=document.getElementById("bb_code").value.trim();
				if(bbCode==null || bbCode==""){
					ShowAlert('提示框','请输入业务单号',200,100);
					return;
				}
				str=str+"&cb_bb_code=1";
			}
			if(document.getElementById("cb_cont").checked){
				var cont=document.getElementById("cont").value.trim();
				if(cont==null || cont==""){
					ShowAlert('提示框','请输入摘要',200,100);
					return;
				}
				str=str+"&cb_cont=1";
			}
			if(document.getElementById("cb_fc").checked){
				var fc=document.getElementById("fc").value.trim();
				if(fc==null || fc==""){
					ShowAlert('提示框','请输入内容',200,100);
					return;
				}
				str=str+"&cb_fc=1";
			}
			if(document.getElementById("cb_prod").checked){
			   //var prod=document.getElementById("prod").value.trim();
			   //if(prod==null || prod==""){
			   //   ShowAlert('提示框','请输入材质',200,100);
			   //   return;
			   //}
			   str=str+"&cb_prod=1";
			}
			if(document.getElementById("cb_est").checked){
				var estName=document.getElementById("est_name").value;
				if(estName==null || estName==""){
					ShowAlert('提示框','请输入订货单位',200,100);
					return;
				}
				str=str+"&cb_est=1";
			}
			if(document.getElementById("cb_pm").checked){
				var pmId=document.getElementById("pm_id").value;
				if(pmId==null || pmId=="" || pmId=="0"){
					ShowAlert('提示框','请选择付款方式',200,100);
					return;
				}
				str=str+"&cb_pm=1";
			}
			if(document.getElementById("cb_ts").checked){
				var tsId=document.getElementById("ts_id").value;
				if(tsId==null || tsId=="" || tsId=="0"){
					ShowAlert('提示框','请选择帐套',200,100);
					return;
				}
				str=str+"&cb_ts=1";
			}
			if(document.getElementById("cb_order").checked){
				var orderBy=document.getElementById("order_by").value;
				if(orderBy==null || orderBy==""){
					ShowAlert('提示框','请选择排序类型',200,100);
					return;
				}
				str=str+"&cb_order=1";
			}
		}else{//快速
			str="search_type=2";
			if(!checkDateStr()){
				return;
			}
		}
		var paraStr=createPageParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		window.location="/business/DeliverBillItemSearchResult.ihtm?"+str;
	}
	function doGo(pageIndex){
		var str=getSearchCondition();
		str=str+"&current_page="+pageIndex;
		window.location="/business/DeliverBillItemSearchResult.ihtm?"+str;
	}
	function getSearchCondition(){
		var searchType="${searchType}";
		var str="search_type="+searchType;
		if(searchType=="1"){//高级
			<c:if test="${cbDeliDate=='1'}">str=str+"&cb_deli_date=1";</c:if>
			<c:if test="${cbExam=='1'}">str=str+"&cb_exam=1";</c:if>
			<c:if test="${cbBillCode=='1'}">str=str+"&cb_bill_code=1";</c:if>
			<c:if test="${cbBbCode=='1'}">str=str+"&cb_bb_code=1";</c:if>
			<c:if test="${cbMt=='1'}">str=str+"&cb_mt=1";</c:if>
			<c:if test="${cbCont=='1'}">str=str+"&cb_cont=1";</c:if>
			<c:if test="${cbFc=='1'}">str=str+"&cb_fc=1";</c:if>
			<c:if test="${cbProd=='1'}">str=str+"&cb_prod=1";</c:if>
			<c:if test="${cbPm=='1'}">str=str+"&cb_pm=1";</c:if>
			<c:if test="${cbEst=='1'}">str=str+"&cb_est=1";</c:if>
			<c:if test="${cbTs=='1'}">str=str+"&cb_ts=1";</c:if>
			<c:if test="${cbOrder=='1'}">str=str+"&cb_order=1";</c:if>
		}else{//快速
			
		}
		
		var paraStr=createProgramParaStr();
		if(paraStr!=""){
			str=str+"&"+paraStr;
		}
		
		return str;
	}
	function doJump(pageIndex){
		if(window.event.keyCode==13){
			doGo(pageIndex);
		}
	}
	function DoubleClick(id){
	}
	function refreshWin(){
		if(popRetVal!=null){
			window.location.reload(true);
		}
	}
	<c:if test="${showCost=='1'}">
	function doDownload(){
		var str=getSearchCondition();
		window.location="/business/DeliverBillItemSearchResult.ihtm?content_type=EXCEL&"+str;
	}
	</c:if>
	function doCancel(){
		window.close();
	}
	function doInit(){
		Window_Onload();
		if(window.screen.availWidth>1024){
			var w=window.screen.availWidth*0.98;
			window.resizeTo(w,600);
			//居中
			var resizeWinTop=(window.screen.availHeight-600)/2;
			var resizeWinLeft=(window.screen.availWidth-w)/2;
			window.moveTo(resizeWinLeft,resizeWinTop);
		}
	}
	function checkInput(){
		if(window.event.keyCode==13){
			doSearch();
		}
	}
	function doAutoCheck(objId){
		document.getElementById(objId).checked=true;
	}
	function setDate(type){
		var d=new Date();
		var startStr="";
		var endStr="";
		if(type=="CURRENT_MONTH"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-01";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="PREVIEW_MONTH"){
			d=new Date(d.getFullYear(),d.getMonth(),1);
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-1";
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="TODAY"){
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}else if(type=="YESTERDAY"){
			d.setDate(d.getDate()-1);
			startStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
			endStr=d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
		}
		document.getElementById("start_date").value=startStr;
		document.getElementById("end_date").value=endStr;
		doAutoCheck("cb_order_date");
	}
	function selectEstName(){
		var url="/base/EstablishmentListForSelect.ihtm?type=CLIENT";
		ShowIframe("选择客户",url,900,500,"selectEstNameCallBack()");
	}
	function selectEstNameCallBack(){
		if(popRetVal!=null){
			document.getElementById("est_name").value=popRetVal[1];
			doAutoCheck("cb_est");
		}
	}
</script>
</head>
<body oncontextmenu="return false">
<div class="Wrap"> <!-- 页面主框架 -->
    
	<div id="ListContainer" class="Container"><!-- 主体容器 -->
	    
	    <!-- 标题栏 -->
	    <div class="Heading BillIcon">
	        <div class="HeadingContent">
	            <h1>送货明细一览表</h1>
	            <span class="Note">查询送货的详细清单，<span style="color:black">黑色</span>表示未审核、<span style="color:blue">蓝色</span>表示已审核</span>
	        </div>
	    </div>

		<!-- 主内容 -->
		<div class="Content">
	        <!-- 筛选控件栏 -->
	        <div class="FilterBar ClearFix">
	            <div class="SearchIcon"></div>
	            <span class="fl">
	            	<table class="MoreOption" cellpadding="0" cellspacing="0">
	            		<th class="c1" width="80px">
	            			<input type="checkbox" name="cb_deli_date" id="cb_deli_date" <c:if test="${cbDeliDate=='1' || searchType=='2'}">checked="true"</c:if> style="visibility:hidden;" />
	            			送货日期
	            		</th>
	            		<td width="360px">
	            			<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_deli_date');" id="start_date" name="start_date" value="<c:out value="${startDate}" />">
			            	<img src="/images/calendar.gif" class="imgIconButton" onClick="displayCalendar(document.getElementById('start_date'),'yyyy-mm-dd',this,false,'doAutoCheck(\'cb_deli_date\')');">
			            	<input type="hidden" id="hid_start_date" value="<c:out value="${startDate}" />">
			            	至
			            	<input type="text" class="TextBox Datetime" maxlength="15" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_deli_date');" id="end_date" name="end_date" value="<c:out value="${endDate}" />">
			            	<img src="/images/calendar.gif" class="imgIconButton" onClick="displayCalendar(document.getElementById('end_date'),'yyyy-mm-dd',this,false,'doAutoCheck(\'cb_deli_date\')');">
			            	<input type="hidden" id="hid_end_date" value="<c:out value="${endDate}" />">
			            	<a href="javascript:setDate('CURRENT_MONTH');">本月</a>
							<a href="javascript:setDate('TODAY');">今天</a>
							<a href="javascript:setDate('YESTERDAY');">昨天</a>
							<a href="javascript:setDate('PREVIEW_MONTH');">上月</a>
	            		</td>
	            	</table>
	            </span>
	            <span class="fr">
	            	<a href="javascript:;" id="lnkMoreOption">更多查询选项</a>
		  			<input type="button" value=" 查 询" onClick="doSearch();" class="buttom search-but" id="sSearchButton" name="sSearchButton">
	                <input type="button" value=" 导 出" onClick="doDownload();" class="buttom search-out" id="sDownloadButton" name="sDownloadButton" <c:if test="${showCost!='1' || currentUser.user.userType!=1 && fn:indexOf(currentUser.privs,';NO_EXPO;')!=-1}">disabled="true"</c:if>>
	            </span>
				<div id="dvMoreOptionBox" class="MoreOptionBox" style="display:none;">
					<table class="MoreOption" cellpadding="0" cellspacing="0">
						<tr>
							<th class="c1" width="80px">
			        			<input type="checkbox" name="cb_bill_code" id="cb_bill_code" <c:if test="${cbBillCode=='1'}">checked="true"</c:if>>
			        			送货单号
			        		</th>
			    			<td class="c1" width="260px">
			        			<input type="text" class="TextBox" maxlength="50" name="bill_code" id="bill_code" onFocus="doAutoCheck('cb_bill_code');" onKeyUp="checkInput();" value="<c:out value="${billCode}" />">
								<input type="hidden" id="hid_bill_code" value="<c:out value="${billCode}" />">
			    			</td>
			    			<th class="c2" width="80px">
			        			<input type="checkbox" name="cb_exam" id="cb_exam" <c:if test="${cbExam=='1'}">checked="true"</c:if>>
			        			审核状态
			        		</th>
			    			<td class="c2" width="280px">
			        			<input type="radio" name="examined" id="examine1" onClick="doAutoCheck('cb_exam');" <c:if test="${exam==null || exam=='' || exam=='Y'}">checked="true"</c:if>>已审核
								<input type="radio" name="examined" id="examine2" onClick="doAutoCheck('cb_exam');" <c:if test="${exam=='N'}">checked="true"</c:if>>未审核
								<input type="radio" name="examined" id="examine3" onClick="doAutoCheck('cb_exam');" <c:if test="${exam=='A'}">checked="true"</c:if>>全部
			    			</td>
			    		</tr>
						<tr>
			    			<th class="c1">
			        			<input type="checkbox" name="cb_bb_code" id="cb_bb_code" <c:if test="${cbBbCode=='1'}">checked="true"</c:if>>
			        			业务单号
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="bb_code" id="bb_code" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_bb_code');" value="<c:out value="${bbCode}" />">
								<input type="hidden" id="hid_bb_code" value="<c:out value="${bbCode}" />">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_mt" id="cb_mt" <c:if test="${cbMt=='1'}">checked="true"</c:if>>
	                        	项目类型
			        		</th>
			    			<td class="c3">
			        			<select name="mt_id" id="mt_id" onFocus="doAutoCheck('cb_mt');">
									<option value="0">==请选择==</option>
									<commonTag:createSelectTree list="${mtList}" emptyOption="0" justEnabled="1" defaultValue="${mtId}" />
								</select>
			        		</td>
						</tr>
						<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_cont" id="cb_cont" <c:if test="${cbCont=='1'}">checked="true"</c:if>>
			        			摘要
			        		</th>
			        		<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="cont" id="cont" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_cont');" value="${cont}" >
								<input type="hidden" id="hid_cont" value="<c:out value="${cont}" />">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_fc" id="cb_fc" <c:if test="${cbFc=='1'}">checked="true"</c:if>>
	                        	内容
			        		</th>
			    			<td class="c3">
			        			<input type="text" class="TextBox" maxlength="50" name="fc" id="fc" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_fc');" value="<c:out value="${fc}" />">
								<input type="hidden" id="hid_fc" value="<c:out value="${fc}" />">
			        		</td>
			    		</tr>
						<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_est" id="cb_est" <c:if test="${cbEst=='1'}">checked="true"</c:if>>
			        			订货单位
			        		</th>
			    			<td class="c1">
			        			<input type="text" class="TextBox" maxlength="50" name="est_name" id="est_name" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_est');" value="<c:out value="${estName}" />">
								<img class="imgIconButton" src="/images/make-a.gif" onClick="selectEstName();" />
								<input type="hidden" id="hid_est_name" value="<c:out value="${estName}" />">
			    			</td>
			    			<th class="c2">
			        			<input type="checkbox" name="cb_prod" id="cb_prod" <c:if test="${cbProd=='1'}">checked="true"</c:if>>
	                        	材质
			        		</th>
			    			<td class="c3">
			        			<input type="text" class="TextBox" maxlength="50" name="prod" id="prod" onKeyUp="checkInput();" onFocus="doAutoCheck('cb_prod');" value="<c:out value="${prod}" />">
								<input type="hidden" id="hid_prod" value="<c:out value="${prod}" />">
			        		</td>
			    		</tr>
						<tr>
							<th class="c1">
			        			<input type="checkbox" name="cb_ts" id="cb_ts" <c:if test="${cbTs=='1'}">checked="true"</c:if>>
	                        	账套
			        		</th>
			    			<td class="c1">
			        			<select name="ts_id" id="ts_id" onFocus="doAutoCheck('cb_ts');">
				    				<option value="0">==请选择账套==</option>
				    				<c:forEach var="item" items="${tsList}">
									<option value="${item.id}" <c:if test="${tsId==item.id}">selected</c:if>>${item.title}</option></c:forEach>
								</select>
			        		</td>
			        		<th class="c2">
			        			<input type="checkbox" name="cb_pm" id="cb_pm" <c:if test="${cbPm=='1'}">checked="true"</c:if>>
			        			付款方式
			        		</th>
			        		<td class="c3">
			        			<select name="pm_id" id="pm_id" onFocus="doAutoCheck('cb_pm');">
				    				<option value="0">==请选择付款方式==</option>
				    				<c:forEach var="item" items="${pmList}">
									<option value="${item.id}" <c:if test="${pmId==item.id}">selected</c:if>>${item.modeName}</option></c:forEach>
								</select>
			    			</td>
						</tr>
			    	</table>
			    	<div class="OptionOrderBy">
	                	<input type="checkbox" name="cb_order" id="cb_order" <c:if test="${cbOrder=='1'}">checked="true"</c:if>>
	                    	排序类型
	                    <select name="order_by" id="order_by" onFocus="doAutoCheck('cb_order');">
	                        <option value="">==请选择==</option>
						  	option value="DELIVER_DATE" <c:if test="${orderBy=='DELIVER_DATE'}">selected</c:if>>送货日期</option>
						  	<option value="BILL_CODE" <c:if test="${orderBy=='BILL_CODE'}">selected</c:if>>送货单号</option>
						  	<option value="BB_CODE" <c:if test="${orderBy=='BB_CODE'}">selected</c:if>>业务单号</option>
						  	<option value="EST_NAME" <c:if test="${orderBy=='EST_NAME'}">selected</c:if>>订货单位</option>
	                    </select>
	                    <select name="order_sc" id="order_sc" onFocus="doAutoCheck('cb_order');">
	                        <option value="ASC" <c:if test="${orderSc=='ASC'}">selected</c:if>>升序</option>
	                        <option value="DESC" <c:if test="${orderSc=='DESC'}">selected</c:if>>降序</option>
	                    </select>
	                    <span class="fr"><a href="javascript:;" id="lnkHiddenOption">隐藏查询选项</a></span>
	                </div>
			    </div>
			</div>
			
			<!-- 提示信息显示栏 -->
	        <div class="MsgBar">
	            <%@include file="../inc/AlertMsg.jsp"%>
	        </div>
			
			<div class="table-list">
	        	<table style="width:1470px;">
	          		<tr>
	          			<th  style="width:70px;">送货日期</th>
					  	<th  style="width:110px;">送货单号</th>
						<th  style="width:120px;">摘要</th>
						<th  style="width:80px;">项目类型</th>
						<th  style="width:120px;">内容</th>
						<th  style="width:100px;">材质</th>
						<th  style="width:130px;">规格</th>
						<th  style="width:50px;">单位</th>
						<th  style="width:70px;">数量</th>
						<th  style="width:70px;">单价</th>
						<th  style="width:100px;">金额</th>
						<th  style="width:130px;">订货单位</th>
						<th  style="width:80px;">付款方式</th>
						<th  style="width:60px;">业务员</th>
						<th  style="width:110px;">业务单号</th>
			  		</tr>
					<c:forEach var="item" items="${qr.list}" varStatus="i">
					<c:if test="${(i.index mod 2)==0}"><c:set var="trClass" value="query_list_data_tr1" /></c:if>
					<c:if test="${(i.index mod 2)!=0}"><c:set var="trClass" value="query_list_data_tr2" /></c:if>
					<c:set var="defaultFontColor" value="black" />
					<c:if test="${item[19]=='Y'}"><c:set var="defaultFontColor" value="blue" /></c:if>
					<tr class="${trClass}" style="color:${defaultFontColor};cursor:pointer;" defaultFontColor="${defaultFontColor}" index="${i.index+1}" onClick='javascript:ClickCheck(this)' ondblclick='javascript:DoubleClick(${item[0]})' onmouseout='javascript:mouseout(this)' onmouseover='javascript:mouseover(this)'>
						<td>
							<input type="radio" name='query_checkbox' value="${item[0]}" style="display:none">
							<fmt:formatDate value="${item[1]}" pattern="yyyy-MM-dd"/>
						</td>
						<td>${item[2]}</td>
						<td>${item[3]}</td>
						<td><commonTag:showSimpleObjectName list="${mtList}" objectId="${item[4]}" /></td>
						<td>${item[5]}</td>
						<td>${item[6]}</td>
						<td>${item[7]}</td>
						<td>
							<c:if test="${item[17]=='AREA'}">平方米</c:if>
							<c:if test="${item[17]=='LENGTH'}">
								<c:if test="${item[18]=='M'}">米</c:if><c:if test="${item[18]=='CM'}">公分</c:if>
							</c:if>
							<c:if test="${item[17]=='AMOUNT'}">&nbsp;${item[8]}</c:if>
						</td>
						<td><commonTag:parseBigDecimal source="${item[9]}" /></td>
						<td><c:if test="${showCost=='1'}"><commonTag:parseBigDecimal source="${item[10]}" /></c:if></td>
						<td><c:if test="${showCost=='1'}"><commonTag:parseBigDecimal source="${item[10]*item[9]}" scale="2" /></c:if></td>
						<td>${item[11]}</td>
						<td><commonTag:showSimpleObjectName list="${pmList}" objectId="${item[12]}" /></td>
						<td>${item[13]}</td>
						<td>${item[14]}</td>
					</tr>
					</c:forEach>
				</table>
			</div>
	
			<!-- 底栏 分页、操作等 -->
	        <div class="BottomToolBar ClearFix">
			    <%@include file="../inc/Pages.jsp"%>
	        </div>
			
		</div>
	</div>
</div>
</body>
</html>
<script type="text/javascript">
	function ChangeWindowSize( container, maxWidth ){
	    setTimeout( function(){
	        var w1 = document.documentElement.clientWidth-40;
	        if( w1>maxWidth ) w1 = maxWidth;
	        else if( w1<970 ) w1 = 960;
	        container.style.width = w1+'px';
	    }, 300 );
	}
	var IsAdvSearch = false;
	(function(){
		doInit();
	    var ListContainer = document.getElementById('ListContainer');
	    ChangeWindowSize( ListContainer, 2020 );    // 超过 1280 的最大 1260 ，不全部铺满
	
	    var lnkMoreOption   = document.getElementById('lnkMoreOption');
	    var lnkHiddenOption = document.getElementById('lnkHiddenOption');
	    lnkMoreOption.onclick = function(){
	    	IsAdvSearch = true;
	        document.getElementById('dvMoreOptionBox').style.display = 'block';
	        document.getElementById('cb_deli_date').style.visibility = 'visible';
	        this.style.visibility = 'hidden';
	    };
	    lnkHiddenOption.onclick = function(){
	    	IsAdvSearch = false;
	        document.getElementById('dvMoreOptionBox').style.display = 'none';
	        document.getElementById('cb_deli_date').style.visibility = 'hidden';
	        lnkMoreOption.style.visibility = 'visible';
	    };
	})();
</script>
